<!--
   SweetHome3DViewer.html 31 Mar 2009
   
   Sweet Home 3D, Copyright (c) 2009-2013 Emmanuel PUYBARET / eTeks <info@eteks.com>
   
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-->
<script language="JavaScript" src="http://java.com/js/deployJava.js">
</script>
<script>
  var javaMinimumVersion = "1.6.0_10"; // The first version with Java Plugin 2
  var jars = "lib/SweetHome3DViewer.jar,lib/batik-svgpathparser-1.7.jar";
  // Append Java 3D Jars depending on the platform
  if (navigator.platform.match("Win.*")) {
    if (navigator.platform.match(".*64")) {
      jars += ",lib/windows/x64/java3d.jar";
    } else {
      jars += ",lib/windows/i386/java3d.jar";
    } 
  } else if (navigator.platform.match("Mac.*")) {
    javaMinimumVersion = "1.5";
    jars += ",lib/macosx/java3d.jar";
  } else if (navigator.platform.match("Linux.*")) {
    javaMinimumVersion = "1.6"; // OpenJDK doesn't give its subversion 
    if (navigator.platform.match(".*64")) {
      jars += ",lib/linux/x64/java3d.jar";
    } else {
      jars += ",lib/linux/i386/java3d.jar";
    } 
  } else {
    jars += ",lib/java3d.jar";
  }

  var attributes = {codebase:".",
                    code:"com.eteks.sweethome3d.applet.SweetHome3DViewer",
                    archive:jars,
                    width:"100%", height:"95%",
                    name:"SweetHome3DViewer"};
  var parameters = {java_arguments:"-Xmx640m",
                    navigationPanel:"true",
                    homeURL:"default.sh3d",
                    // JNLP file converted to Base 64 encoding with "base64 -i SweetHome3DViewer.jnlp" command
                    jnlp_embedded:"PD94bWwgdmVyc2lvbj0iMS4wIj8+CjwhLS0KICAgU3dlZXR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lZXRIb21lM0RWaWV3ZXIiIAogICAgICAgICAgICAgICBuYW1lPSJTd2VldEhvbWUzRFZpZXdlciIgd2lkdGg9IjYwMCIgaGVpZ2h0PSI2MDAiLz4KPC9qbmxwPg=="};
   
  deployJava.setInstallerType("kernel");
  deployJava.setAdditionalPackages("javax.swing,javax.imageio");
  deployJava.runApplet(attributes, parameters, javaMinimumVersion);
</script>